package promote.brozen.jvm;

import java.util.HashMap;
import java.util.HashSet;

/**
 * @author Brozen
 * @date 2020/6/18 5:30 PM
 * @email brozen@qq.com
 */
public class TestMemoryAllocate {

    public TestMemoryAllocate() {
        System.out.println("invoke constructor");
    }

    @Override
    public int hashCode() {
        System.out.println("invoke hashcode");
        return super.hashCode();
    }

    public static void main(String[] args) {
        TestMemoryAllocate test = new TestMemoryAllocate();
        System.out.println(test);

        HashSet<TestMemoryAllocate> testSet = new HashSet<TestMemoryAllocate>();
        testSet.add(test);
    }

}
